package org.apache.servicecomb.samples.practise.houserush.sale.redis;

import org.springframework.stereotype.Component;

/**
 * @Author: Snake Man
 * @system:
 * @DateTime: 2022/1/18 21:31
 * @Description:
 */
@Component
public class RedisKey {
    //活动里面，房源订单数据 key的前缀
    private final String SALEHASHID = "SALEHASHID_";
    //活动数据 key的前缀
    private final String SALEID = "SALEID_";
    //没有房源订单的活动数据 key的前缀
    private final String SALENOHOUSEORDER = "SALENOHOUSEORDER_";

    public String getSaleHashKey(int id) {
        return SALEHASHID + id;
    }

    public String getSaleKey(int id) {
        return SALEID + id;
    }

    public String getSaleNoHouseOrder(int saleId){
        return SALENOHOUSEORDER+saleId;
    }
}
